﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using Model.Entity;
using Ones.Dal.Infrastructure;
using Ones.Infrastructure.Utils.Pagination.Impl;

namespace Ones.Wcf.WebAdministration
{
    [ServiceContract]
    public interface IServiceCategoryManagement
    {
        #region Category
        
        #region DMM
        
        /// <summary>
        /// Tao chuyen muc tin tuc.
        /// </summary>
        /// <param name="category"></param>
        /// <returns></returns>
        [OperationContract]
        Boolean addCategory(Category category);
        
        /// <summary>
        /// Thay doi thong tin chuyen muc tin tuc.
        /// </summary>
        /// <param name="category"></param>
        /// <returns></returns>
        [OperationContract]
        Boolean updateCategory(Category category);
        
        /// <summary>
        /// Xoa chuyen muc tin tuc.
        /// </summary>
        /// <param name="category"></param>
        /// <returns></returns>
        [OperationContract]
        Boolean deleteCategory(String catId);

        #endregion
        
        #region DQM
        
        [OperationContract]
        List<Category> searchAllCategories();
        
        [OperationContract]
        Category searchCategoryById(String catId);
        
        [OperationContract]
        List<Category> searchCategoryByName(String catName);
        
        [OperationContract]
        List<Category> searchCategoryByParent(String catId);
        
        [OperationContract]
        List<Category> searchCategoryByDivision(String divId);
        
        #endregion
        
        #endregion
        
        #region ///Paging///
        
        [OperationContract]
        List<Category> searchCategory(String searchBy, String keyword);
        
        [OperationContract]
        PagingObject<Category> getCategories(int page);
        
        [OperationContract]
        LazyPagination<Category> pagingAllCategories(int pageNumber, int pageSize);

        #endregion
    }
}